var infoTemplatesArr = [];

var geometryServiceUrl =
  "http://10.141.72.22:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer";
var quxianLayerUrl =
  "http://10.108.3.39:6080/arcgis/rest/services/CL_QUXIAN/MapServer/0";
// var jiedaoLayerUrl = "http://10.108.3.39:6080/arcgis/rest/services/%E5%8C%BA%E5%88%92/MapServer/0";
var jiedaoLayerUrl =
  "http://10.121.226.95:8081/OneMapServer/rest/services/frontier2018/MapServer/10";
var districtNameField = "区县名称";
var streetNameField = "NAME";

var baseMapUrl =
  oneMapServerIP +
  "/OneMapServer/rest/services/BaseMap/MapServer?token=" +
  GLOBAL_TOKEN;

var roadLayerId = 1;

var D_LAYERS = [
  {
    layerId: "LGlayer",
    visible: true,
    opacity: 0.6,
    // 原来的
    // url: oneMapServerIP + "/OneMapServer/rest/services/ZMQ_LG2/MapServer",
    // url:
    //   oneMapServerIP +
    //   "/OneMapServer/rest/services/ZMQ_LG2/MapServer?token=" +
    //   GLOBAL_TOKEN,

    // 新增的
    url:"http://10.141.72.22:6080/arcgis/rest/services/LG_AREA/MapServer",
    // url: "http://10.107.67.82/ArcGIS/rest/services/SHSLPCZH/MapServer",
   
    zTreeDivId: "layerList",
    zTreeSearchInputId: "key",
  }
  ,
  {
    layerId: "LGyunqulayer",
    visible: true,
    opacity: 0.6,
    url: "http://10.141.72.22:6080/arcgis/rest/services/LG_GARDEN/MapServer",
    // url:"http://10.141.72.22:6080/arcgis/rest/services/LG_AREA/MapServer",
    zTreeDivId: "themeLayerList",
    zTreeSearchInputId: "key",
  },

  // 上侧新增的园区图层的展示
  // {
  //     layerId: "themelayer",
  //     visible: false,
  //     opacity: 0.6,
  //     // url: "http://10.108.3.39:6080/arcgis/rest/services/CL_SUBWAY/MapServer",
  //     url: "http://10.108.3.39:6080/arcgis/rest/services/AJ_WHPQY2019/MapServer",
  //     zTreeDivId: "themeLayerList",
  //     zTreeSearchInputId: "themeKey",
  // },
  // {
  //     layerId: "otherLayer",
  //     visible: false,
  //     opacity: 0.6,
  //     url: "http://10.108.3.39:6080/arcgis/rest/services/GQ4%E6%9E%84%E7%AD%91%E7%89%A9/MapServer",
  //     // url: "http://10.108.3.50/changsanjiao/rest/services/DTL/MapServer",
  //     zTreeDivId: "otherLayerList",
  //     zTreeSearchInputId: "otherKey",
  // },
  // {
  //     layerId: "otherLayer1",
  //     visible: false,
  //     opacity: 0.6,
  //     url: "http://10.108.3.13/pdland/rest/services/PD_devboundary/MapServer",
  //     zTreeDivId: "otherLayerList1",
  //     zTreeSearchInputId: "otherKey",
  // },
  // {
  //     layerId: "waterLayer",
  //     visible: false,
  //     opacity: 0.6,
  //     url: "http://10.107.67.82/ArcGIS/rest/services/SHSLPCZH/MapServer",
  //     zTreeDivId: "otherLayerList1",
  //     zTreeSearchInputId: "otherKey",
  // }
];

//底图加载用的服务
var BASE_LAYERS = [
  {
    layerId: "base_zhengwu",
    name: "政务地图",
    type: "base",
    visible: false,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/BaseMap/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "base_anse",
    name: "暗色地图",
    type: "anse",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/shmap_as2/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "base_2020",
    name: "2020年影像",
    type: "air",
    visible: false,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air/MapServer?token=" +
      GLOBAL_TOKEN,
  },
//   {
//     layerId: "base_yuanqu",
//     name: "园区分布",
//     type: "yuanqu",
//     visible: true,
//     url: "http://10.141.72.22:6080/arcgis/rest/services/LG_GARDEN/MapServer",
//   }
  // ,{
  //     layerId: "base_2019",
  //     name: "2019年影像",
  //     type:"air",
  //     visible: false,
  //     url: oneMapServerIP+"/OneMapServer/rest/services/Air2019/MapServer?token=" + GLOBAL_TOKEN
  // }, {
  //     layerId: "base_2018",
  //     name: "2018年影像",
  //     type:"air",
  //     visible: false,
  //     url: oneMapServerIP+"/OneMapServer/rest/services/Air2018/MapServer?token=" + GLOBAL_TOKEN
  // }, {
  //     layerId: "base_2017",
  //     name: "2017年影像",
  //     type:"air",
  //     visible: false,
  //     url: oneMapServerIP+"/OneMapServer/rest/services/Air2017/MapServer?token=" + GLOBAL_TOKEN
  // }, {
  //     layerId: "base_2016",
  //     name: "2016年影像",
  //     type:"air",
  //     visible: false,
  //     url: oneMapServerIP+"/OneMapServer/rest/services/Air2016/MapServer?token=" + GLOBAL_TOKEN
  // }
];

var T_LAYERS = [
  {
    layerId: "2019",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2019/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "2018",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2018/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "2017",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2017/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "2016",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2016/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "2015",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2015S/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "2014",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2014S/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "2013",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2013S/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "2012",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2012X/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "2011",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2011/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "2010",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2010/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "2008",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2008/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "2006",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air2006/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "1994",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air1994/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "1979",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air1979/MapServer?token=" +
      GLOBAL_TOKEN,
  },
  {
    layerId: "1948",
    visible: true,
    url:
      oneMapServerIP +
      "/OneMapServer/rest/services/Air1948/MapServer?token=" +
      GLOBAL_TOKEN,
  },
];

var satLayerUrls = [
  {
    1801: oneMapServerIP + "/OneMapServer/rest/services/Sat_GJ1/MapServer",
  },
  {
    1802: oneMapServerIP + "/OneMapServer/rest/services/Sat_GJ12/MapServer",
  },
  {
    1803: oneMapServerIP + "/OneMapServer/rest/services/Sat_GJ13/MapServer",
  },
  {
    1804: oneMapServerIP + "/OneMapServer/rest/services/Sat_GJ14/MapServer",
  },
];

var changeDetectionLayerUrls = [
  {
    jd1:
      "http://10.108.3.39:6080/arcgis/rest/services/CHANGEDETECTION/MapServer",
  },
  {
    jd2:
      "http://10.108.3.39:6080/arcgis/rest/services/CHANGEDETECTION2/MapServer",
  },
];
